import 'dart:ui';

import 'package:flutter/foundation.dart';

class MainManager with ChangeNotifier {
  static MainManager instance = MainManager();
  bool showTimeStatus = true; //控制时分显示
  bool showSecondStatus = true; //控制秒显示
  bool themeLightStatus = true; //控制秒显示
  bool h24 = true; //是否24格式
  Color primaryColor = Color(0xFFED5223);
  Color primaryColorDark = Color(0xFF521502);
  Color primaryColorLight = Color(0xFFFFDACF);

  void changeShowTimeStatus(status) {
    showTimeStatus = status;
    notifyListeners();
  }

  void changeShowSecondStatus(status) {
    showSecondStatus = status;
    notifyListeners();
  }

  void changeH24(status) {
    h24 = status;
    notifyListeners();
  }

  void changeThemeLightStatus(status) {
    themeLightStatus = status;
    if (themeLightStatus) {
      primaryColor = Color(0xFFED5223);
      primaryColorDark = Color(0xFF521502);
      primaryColorLight = Color(0xFFFFDACF);
    } else {
      primaryColor = Color(0xFF669DF0);
      primaryColorDark = Color(0xFF01265C);
      primaryColorLight = Color(0xFFDEEBFF);
    }

    notifyListeners();
  }

  void init() async {}
}
